#include <iostream>

class Student
{
    public:
    Student() //无参构造函数
    {
        std::cout<<"无参构造\n";
    }
    Student(int a) //带参构造函数
    {
        std::cout<<"带参构造\n";
        id = a;
    }
    Student(int a, const std::string& b)
    {
        id = a;
        name = b;
    }
    Student(const Student& s) //拷贝构造，复制构造
    {
        id = s.id;
        name = s.name;
        std::cout<<"拷贝构造函数"<<std::endl;
    }
    void operator = (const Student &s)
    {
        id = s.id;
        name = s.name;
        std::cout<<"赋值运算符的重载"<<std::endl;
    }
    void show()
    {

    }
    ~Student()
    {
        std::cout<<"析构函数！"<<std::endl;
    }

private:
    int id;
    std::string name;
};

Student func(Student& s)
{
    return s;
}


int main()
{
    // Student s(1,"zahngsan");
    // s.show();
    // // Student s;
    // // Student s1(1);
    // // Student s2(1,"zahngsan");
    // Student s1(s);
    // s1.show();
    Student s;
    Student s2 = func(s);
    
    return 0;
}